import pymysql

class ChangeDatabase():

    def update(self,sql):
        connect = pymysql.connect(host="192.168.154.129",user="root",password="root",database="finance")
        cursor = connect.cursor()
        cursor.execute(sql)
        connect.commit()
        cursor.close()
        connect.close()